Encryption-based control of network traffic

ABSTRACT

A computer-implemented method for protecting a computer network ( 22 ) includes receiving at a gateway ( 24 ) data transmitted from a source address for delivery to a destination on the computer network. The data are encrypted at the gateway using an encryption key selected from a set of one or more keys that are not available to the source address. The encrypted data are transmitted over the computer network toward the destination. The transmitted encrypted data are received and decrypted for use at the destination by means of one of the keys in the set.

FIELD OF THE INVENTION

The present invention relates generally to data communication systems, and specifically to systems and methods for preventing attacks on computers in a network by malicious communication traffic.

BACKGROUND OF THE INVENTION

Data encryption is widely used in preventing unauthorized access to data. Various methods of data encryption are known in the art. In general, these methods use a key to convert data to a form that is unintelligible to a reader (human or machine), and require an appropriate key in order to decrypt the data. Symmetric encryption methods use the same key for both encryption and decryption. Such symmetric methods include the well-known DES (Data Encryption Standard) and AES (Advanced Encryption Standard) algorithms, as well as simpler methods, which are sometimes referred to as “scrambling.”

In asymmetric encryption methods, such as the RSA (Rivest Shamir Adelman) algorithm, a computer that is to receive encrypted data generates complementary public and private keys and transmits the public key to the sender. After the sender has encrypted the data using the public key, only the holder of the private key can decrypt it.

SUMMARY OF THE INVENTION

Embodiments of the present invention use data encryption techniques to protect a network (including computers on the network) from malicious data transmissions. Such malicious transmissions may contain program code, such as computer viruses and worms in the guise of protocol headers or payload data, for example, that is intended to infect switches, hosts, and other nodes in the network. In other cases, malicious transmissions may contain confidential data, extracted surreptitiously from a computer by a Trojan horse program or a human intruder. When data transmissions that are directed to or from the protected network are encrypted, these sorts of program code and data are scrambled and are thus rendered harmless until they are decrypted. Decryption may be controlled so as to neutralize the malicious effects of the transmission.

In some embodiments of the present invention, a gateway is used to encrypt transmissions to destinations within a protected network from sources outside the protected network. If sources of malicious transmissions were to know in advance the key that is used in encrypting data transmission within the network, these source could prepare their transmissions in such a way as to have malicious effect after encoding. In order to prevent this eventuality, the gateway at the ingress to the protected network uses an encryption key that is not available to the source. For example, the gateway may choose keys using a pseudo-random process for encrypting incoming data transmissions. The gateway then transmits the encrypted data over the protected network to a designated receiver, where the data are then decrypted and “sterilized.” Optionally, the key may be transmitted to the receiver over the protected network, as well, either together with the data or separated from the data by a selected time interval. In some embodiments, the gateway performs the steps of choosing the key, encrypting the data, and transmitting the encrypted data and key automatically, without intervention of a human operator.

In other embodiments of the present invention, a gateway encrypts transmissions from sources within a protected network to destinations outside the protected network. The gateway encrypts the data with a key that is not initially available to the source or to the receiving computer at the destination of the transmission. The gateway transmits the key to the receiving computer only upon receiving confirmation that the transmission from the source was authorized. This confirmation may be in the form, for example, of a digital signature belonging to an authorized user or authorized software application, which is appended to the data transmitted to the gateway from the source. The gateway checks the validity of the digital signature (or other confirmation), and only then transmits the key that the receiving computer will need in order to decrypt the data. Thus, even if a malicious user or program is successful in making an unauthorized transmission of data, the recipient of the transmission will be unable to decrypt and use the data.

There is therefore provided, in accordance with an embodiment of the present invention, a computer-implemented method for protecting a computer network, including:

receiving at a gateway data transmitted from a source address for delivery to a destination on the computer network;

encrypting the data at the gateway using an encryption key selected from a set of one or more keys that are not available to the source address;

transmitting the encrypted data over the computer network toward the destination; and

receiving the transmitted encrypted data, and decrypting the data for use at the destination by means of one of the keys in the set.

Typically, encrypting and transmitting the data are performed automatically, without intervention by a human operator.

In a disclosed embodiment, receiving the data includes receiving the data from a public network, and wherein transmitting the encrypted data includes conveying the encrypted data over a private network.

In some embodiments, receiving the data includes receiving a data packet including a header and a payload, and encrypting the data includes encrypting both the header and the payload. Typically, conveying the encrypted data includes encapsulating the encrypted header and payload in another packet for transmission over the computer network.

In some embodiments, the method includes conveying to a receiver a decryption key suitable for decrypting the data for use at the destination. The encryption key may be selected using a pseudo-random process. Additionally or alternatively, conveying the decryption key may include transmitting the decryption key to the receiver over the computer network, wherein transmitting the decryption key and the encrypted data includes conveying the decryption key together with at least a portion of the encrypted data together over the computer network, possibly in a single data packet. Alternatively, transmitting the decryption key includes waiting for a selected delay period between transmitting the encrypted data and transmitting the decryption key to the receiver.

In a disclosed embodiment, the method includes, upon decrypting the data, checking the data for malicious content. Decrypting the data may include separately decrypting each of a sequence of segments of the encrypted data, and checking the data may include verifying each segment in the sequence to ensure that the segment does not contain the malicious content before proceeding to decrypt succeeding segments in the sequence.

There is also provided, in accordance with an embodiment of the present invention, a computer-implemented method for protecting a computer network, including:

receiving a first data packet, including a header and a payload, transmitted from a source address for delivery to a destination on the computer network;

encrypting at least the header of the first data packet, thereby generating an encrypted data packet;

encapsulating the encrypted data packet in a second data packet, and transmitting the second data packet over the computer network toward the destination; and

receiving and processing the transmitted second data packet so as to decapsulate and decrypt the first data packet for use at the destination.

In a disclosed embodiment, encapsulating the encrypted data includes conveying a key for use in decrypting the data together with the encrypted data packet in the second data packet. The method may include, upon decrypting the first data packet, checking at least one part of the data packet, selected from among the header and the payload, for malicious content.

There is additionally provided, in accordance with an embodiment of the present invention, a computer-implemented method for protecting against malicious traffic, including:

receiving over a computer network a data packet including encrypted data for delivery to a destination on the computer network;

sequentially decrypting each of a sequence of segments of the encrypted data; and

after decrypting each of the segments, verifying each segment to ensure that the segment does not contain malicious content before proceeding to decrypt a succeeding segment in the sequence.

There is further provided, in accordance with an embodiment of the present invention, apparatus for protecting a computer network, including:

a gateway, which is configured to receive data transmitted from a source address for delivery to a destination on the computer network, and to encrypt the data using an encryption key selected from a set of one or more keys that are not available to the source address, encrypting the data using the key, and to transmit the encrypted data over the computer network toward the destination; and

a receiver, which is configured to receive the transmitted encrypted data, and to decrypt the data for use at the destination by means of one of the keys in the set.

There is moreover provided, in accordance with an embodiment of the present invention, apparatus for protecting a computer network, including:

a gateway, which is configured to receive a first data packet, including a header and a payload, transmitted from a source address for delivery to a destination on the computer network, to encrypt at least the header of the first data packet, thereby generating an encrypted data packet, and to encapsulate the encrypted data packet in a second data packet, and transmitting the second data packet over the computer network toward the destination; and

a receiver, which is configured to receive and process the transmitted second data packet so as to decapsulate and decrypt the first data packet for use at the destination.

There is furthermore provided, in accordance with an embodiment of the present invention, a computer software product, including a computer-readable medium in which program instructions are stored, which instructions, when read by a computer, cause the computer to receive over a computer network a data packet including encrypted data for delivery to a destination on the computer network, and to sequentially decrypt each of a sequence of segments of the encrypted data, and after decrypting each of the segments, to verify each segment to ensure that the segment does not contain malicious content before proceeding to decrypt a succeeding segment in the sequence.

There is also provided, in accordance with an embodiment of the present invention, a computer-implemented method for protecting data, including:

receiving at a gateway data transmitted from a source within a protected computer network for delivery to a destination outside the protected computer network;

encrypting the data at the gateway using an encryption key selected from a set of one or more keys that are not available to the source or to the destination prior to receiving the data at the gateway;

transmitting the encrypted data to the destination;

receiving at the gateway a confirmation of an authorization to transmit the data from the source; and

responsively to the confirmation, conveying a decryption key suitable for decrypting the data to the destination.

In one embodiment, receiving the confirmation includes receiving an electronic signature transmitted from the source. Alternatively or additionally, transmitting the encrypted data includes transmitting the encrypted data over a one-way link from the gateway to destinations outside the protected computer network. Typically, encrypting and transmitting the data are performed automatically, without intervention by a human operator. The protected computer network may be a private network, and transmitting the encrypted data may include conveying the encrypted data over a public network.

In some embodiments, receiving the data includes receiving a data packet including a header and a payload, and encrypting the data includes encrypting both the header and the payload, wherein conveying the encrypted data includes encapsulating the encrypted header and payload in another packet for transmission to the destination. Additionally or alternatively, encrypting the data includes selecting the encryption key using a pseudo-random process. Further additionally or alternatively, conveying the decryption key includes transmitting the decryption key to the destination after transmitting the encrypted data.

There is additionally provided, in accordance with an embodiment of the present invention, apparatus for protecting data, including:

a source computer, which is configured to be deployed in a protected computer network and to generate data for delivery to a destination outside the protected computer network; and

a gateway, which is coupled to receive and encrypt the data from the source computer using an encryption key selected from a set of one or more keys that are not available to the source computer or to the destination prior to receiving the data at the gateway, to transmit the encrypted data to the destination, to receive a confirmation of an authorization to transmit the data from the source, and responsively to the confirmation, to convey a decryption key suitable for decrypting the data at the destination.

The present invention will be more fully understood from the following detailed description of the embodiments thereof, taken together with the drawings in which:

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram that schematically illustrates a protected computer network, in accordance with an embodiment of the present invention;

FIG. 2 is a flow chart that schematically illustrates a method for processing network traffic, in accordance with an embodiment of the present invention; and

FIG. 3 is a block diagram that schematically illustrates a protected computer network, in accordance with another embodiment of the present invention.

DETAILED DESCRIPTION OF EMBODIMENTS

FIG. 1 is a block diagram that schematically illustrates a system 20 for protecting a communication network 22 from malicious traffic, in accordance with an embodiment of the present invention. Typically, network 22 is a controlled, private network, such as a campus or enterprise network, or a secure virtual private network (VPN). In the configuration shown in FIG. 1, an encryption gateway 24 receives and encrypts incoming data traffic destined for addresses on network 22 from a public network 26, such as the Internet. The term “data traffic,” as used herein, refers to any and all sorts of data that may be transmitted over networks 22 and 26, and may thus comprise not only payload data, but also packet headers and signaling traffic, for example. Gateway 24 encrypts the traffic, as described hereinbelow, and then transmits the traffic in encrypted form toward the appropriate destination. In the example shown in FIG. 1, the destination is a client computer 28.

Before delivery of the data to the appropriate application on computer 28, the data are decrypted and “sterilized” by a data receiver 30. Receiver 30 may reside on a server or it may alternatively be a function of computer 28. To decrypt the data, receiver 30 typically uses a key that is provided by gateway 24 and transmitted to the receiver over network 22, as described hereinbelow. After decryption, the receiver sterilizes the data in order to detect and neutralize any malicious content, such as viruses, worms and spyware, for example. Again, this “content” may be found in any part of the transmitted traffic, including not only payloads, but also protocol headers and signaling.

Because the traffic is transmitted through network 22 in encrypted form, the malicious content is scrambled and therefore cannot affect elements of network 22 that it traverses between gateway 24 and receiver 30. Although the sterilization functions of receiver 30 could be performed at the ingress to network 22 (where gateway 24 is located), the system configuration shown in FIG. 1 permits these functions to be distributed among multiple receivers and thus permits thorough and systematic sterilization without creating a bottleneck at the network ingress. Furthermore, if the sterilization process at receiver 30 fails to detect and block an item of malicious content, the consequences will probably be limited to computer 28 (and possibly other computers in its immediate vicinity), rather than spreading through the entire network as might occur if the malicious content were transmitted through network 22 unencrypted.

System 20 may operate over substantially any sort of networks and communication links. For example, although the embodiments described herein relate mainly to packet networks and packet data traffic, the principles of the present invention are similarly applicable to communication networks of other types, such as circuit-switched networks. The communication links in system 20 may be wired or wireless, synchronous or asynchronous, and they may be either unidirectional or bidirectional. Gateway 24 may be configured to operate in conjunction with any of these link types. In addition, the gateway may perform its protection function bidirectionally, encrypting both incoming data directed to computer 28 and outgoing data transmitted by computer 28 to other networks, for example. Furthermore, although the embodiments described herein refer to encryption of transmissions to computer 28, the encrypted traffic may be directed to any sort of destination on network 22, such as to a storage device, rather than a client computer. (In the case of a storage device, the data may be stored in the encrypted form generated by gateway 24, and then decrypted and sterilized only subsequently, possibly only when the data are actually needed.)

Gateway 24 and receiver 30 may each comprise either dedicated hardware or a general-purpose, software-driven computer processor, or a combination of hardware and software elements. For rapid encryption, as well as enhanced security, for example, the gateway may comprise one or more gate arrays with suitable firmware and/or an application-specific integrated circuit (ASIC). If a general-purpose computer processor is used, the software for carrying out the functions described herein may be downloaded to the processor over a network, or it may be alternatively provided on tangible media, such as optical, magnetic, or electronic memory media. In either case, once the operator of system 22 has configured gateway 24 and receiver 30 to communicate with one another and perform their respective functions, the gateway and receiver will typically carry out these functions on each packet that they transmit and receive without further human intervention. Alternatively, in some cases, a human operator may be more closely involved in running the gateway.

FIG. 2 is a flow chart that schematically illustrates a method for processing network traffic, in accordance with an embodiment of the present invention. For convenience and clarity, the method is described with reference to elements of system 20 (FIG. 1), but the method may alternatively be implemented, mutatis mutandis, in other sorts of data communication systems, as noted above. The method is initiated when gateway 24 receives a packet from network 26 that is directed to a destination on protected network 22, such as client computer 28. Gateway 24 may be configured to intercept and process all incoming traffic to network 22. Alternatively, the gateway may be programmed to intercept certain types of traffic or to intercept traffic selectively to certain destination addresses and/or at certain times or using certain protocols.

Gateway 24 automatically chooses a key to encrypt the data packet, at an encryption step 42. Typically, the gateway chooses the key using a pseudo-random process. The key may be chosen by selection from a list that was prepared in advance, or it may be chosen by pseudo-random generation at the time the data packet is received. (Alternatively, the key may be chosen deterministically, as long as it is not known or available to the sending computer.) The key may be of any suitable length, depending on the encryption algorithm that is used, but in general, even mild encryption using a short key (sometimes referred to as “scrambling”) is sufficient for the purposes of the present method. If an asymmetric encryption algorithm is used, as described in the Background of the Invention, the gateway chooses both a public key for use in encrypting the data packet and a corresponding private key for subsequent decryption. Otherwise, for symmetric encryption, the encryption and decryption keys are the same.

Typically, gateway 24 encrypts the entire data packet, including both the payload and protocol headers. An advantage of this approach is that it prevents protocol-level attacks on switches and other nodes in network 22 that the packet traverses, as well as protocol-level attacks on the operating systems or application programs of hosts in network 22 (including both kernel and user modes). Only the receiver and destination computer (client 28 in this example) may be subject to a protocol attack after the packet is decrypted, but this possibility may be mitigated by careful sterilization in receiver 30.

Alternatively, for computational efficiency, gateway 24 may encrypt only parts of the packet that are vulnerable to attack. For example, the gateway may encrypt one or more of the protocol headers, while leaving others unencrypted. Alternatively or additionally, the gateway may encrypt the payload data or certain parts of the payload data. Further alternatively or additionally, different parts of the packet (such as headers and payload) may be encrypted using different keys or encryption algorithms. Typically, even if the payload data were already encrypted by the sender on network 26 (as part of a secure transmission protocol, for example), gateway 24 will still add its own layer of encryption to the encrypted data.

In any case, as explained above, the encryption performed at step 42 modifies the content of the data packet in a manner that cannot be predicted by parties attempting to generate malicious traffic. The key is not available to the sending computer. Therefore, any malicious code in the headers or payload of the packet is scrambled and can have no effect on elements of network 22 until it has been decrypted.

After encrypting the data packet, gateway 24 encapsulates the encrypted packet inside another packet for transmission over network 22 to receiver 30, at an encapsulation step 44. (Encapsulation is typically needed since the original packet headers have been encrypted and therefore cannot be used for packet routing and transport. Alternatively, if certain headers, such as the Internet Protocol [IP] header, are not encrypted, encapsulation may be unnecessary.)

The gateway also transmits the decryption key to the receiver. For convenience in transmission and handling, this key may be encapsulated in the same packet as the corresponding encrypted packet. Alternatively, the key may be transmitted separately, either before or after transmission of the encrypted packet. The gateway may wait for a predetermined delay, which is typically known to the gateway and receiver 30, between transmission of the packet and the key. Further alternatively, the key may be conveyed to the receiver via another network or via other media.

Typically, gateway 24 transmits the key to receiver 30 in the clear, without encryption. Clear transmission is possible since the purpose of the encryption is not to keep the contents of the data packet secret from other elements on network 22, but rather to scramble any potential malicious content, as noted above. On the other hand, if it is also desired to keep the contents of the data packet confidential during transmission over network 22, gateway 24 may also encrypt the key before transmission to receiver 30. For example, the gateway may encrypt the key using a public key provided by the receiver. Upon receiving the encrypted key from the gateway, the receiver will then apply the corresponding private key in order to decrypt the key for use in decrypting the data packet.

Receiver 30 receives the encrypted, encapsulated packet from gateway 24, at a packet reception step 46. For simplicity, it is assumed here that receiver 30 is embodied in a server, although as noted above, the receiving function may also be performed by client 28 itself. The receiver decapsulates the encrypted packet and then applies the key that was transmitted by the gateway (after decrypting the key, if necessary) in order to decrypt the packet.

Upon decrypting the packet, receiver 30 “sterilizes” the packet by checking the packet headers and payload for content that is suspected of being malicious, at a content checking step 48. Any suitable method known in the art may be used to identify such suspicious content. For example, receiver 30 may check the content against signatures of known malicious programs, such as viruses and worms. As another example, the receiver may check the packet for anomalies in the protocol fields or data content, which may indicate that the packet is of malicious origin.

The receiver may decrypt the entire packet at once at step 46, and may then check the entire packet at step 48. It may be safer, however, to carry out the decryption gradually, using a technique of “window decryption,” in accordance with an embodiment of the present invention. In window decryption, the receiver decrypts small segments of the packet header and/or data, and then analyzes the segments, one at a time, for sterilization. The segments may be discrete or partly overlapping. This gradual method decreases the likelihood that malicious code will infect the receiver itself. This window decryption technique may also be used in other environments and applications in which encrypted traffic is checked for malicious content before delivery to a computer or application program that is to use the content.

If receiver 30 finds suspicious content at step 48, it does not pass the packet to client computer 28, but rather issues an alert (to the user of the computer and/or the system operator and/or to an automated monitoring system) to indicate that it has received a suspect packet. Depending on system configuration, the receiver may simply discard the packet, or it may give the user or system operator the opportunity to check the packet contents under safe conditions, and decide whether to accept or discard the packet. Otherwise, if the receiver finds nothing suspicious about the packet, it simply passes the packet on to the client computer for normal application-level processing.

FIG. 3 is a block diagram that schematically illustrates a system 50 for protecting communication network 22 from unauthorized transmissions of data out of the network, in accordance with an embodiment of the present invention. In this embodiment, a gateway 52 encrypts data traffic before the traffic is transmitted out of network 22 into a public network 26. The functions of gateway 52 and gateway 24 may be combined in a single machine, as noted earlier. Alternatively, network 22 may have separate encryption gateways for incoming (gateway 24) and outgoing (gateway 52) traffic. In either case, the properties and features of gateway 24 that are described above are applicable, mutatis mutandis, to gateway 52, as well.

In the example shown in FIG. 3, gateway 52 receives data from a computer in network 22, such as a server 56, for transmission to a destination computer 58 on network 26. For reasons of security, network 22 may be arranged so that outgoing traffic may exit the network only through gateway 52. Furthermore, gateway 52 may be connected to public network 26 via a one-way link 54, i.e., a communication link that is physically configured to carry signals in one direction and to be incapable of carrying signals in the opposite direction. One-way links may be implemented, for example, using Waterfall™ systems, manufactured by Gita Technologies, Ltd. (Rosh HaAyin, Israel), which provide a physical one-way connection based on fiberoptic communication. The one-way link makes it impossible for a hacker outside network 22 to tamper with gateway 52 (or with other computers in network 22 via the gateway, assuming there is no other ingress to network 22).

In operation of system 50, server 56 prepares data for transmission to destination computer 58 and passes the data to gateway 52. Gateway 52 encrypts the data using a suitable encryption algorithm, which may be symmetric or asymmetric. For the purposes of encryption, the gateway selects a suitable key, by random selection or by other methods of key selection that are described above. In general, the encryption key that is used to encrypt the data (as well as the corresponding decryption key) is not known in advance to either server 56 or destination 58. Even if the data transmitted by server 56 is already encrypted, gateway 52 adds its own layer of encryption, as explained above in regard to gateway 24.

Gateway 52 sends the encrypted data over link 54 to destination computer 58. To reduce transmission latency and memory requirements at gateway 52, the gateway may begin to encrypt and transmit the data as soon as it starts to receive the data stream from server 56. As noted above in reference to gateway 24, gateway 52 may encrypt all or part of the data, and may also encrypt protocol headers of data packets transmitted by server 56. The gateway may encapsulate the data transmitted by server 56 (including both payloads and headers of data packets) inside other data packets, with suitable (non-encrypted) headers for transmission over network 26. Other features of the encryption and transmission procedures described above in reference to gateway 24 may likewise be applied by gateway 52.

Without the necessary decryption key, computer 58 is unable to do anything with the encrypted data that it receives other than to store it. Therefore, even if a user of computer 58 was able to cause server 56 to send the data without the proper authorization, this user will be unable to read the data. The unauthorized transmission in such cases might have been engendered by a user of server 56, either maliciously or inadvertently, or by autonomous operation of a Trojan horse or other malicious code that was loaded into the server. In any case, as long as the egress from network 22 to network 26 is controlled by gateway 52, the data received by computer 58 will be encrypted.

Gateway 52 sends the necessary decryption key to computer 58 only after receiving confirmation that the transmission of data to this computer was properly authorized. The confirmation may have the form of a digital signature, which server 56 transmits to gateway 52 in the course of or at the end of the data transmission. The digital signature may be generated using any suitable means and method known in the art. For example, server 56 may generate and transmit the digital signature based on a secret code contained in a smart card or other medium that an authorized user couples to server 56 when the data are to be transmitted. The gateway verifies the authenticity of the digital signature before sending the decryption key to computer 58. Alternatively, the authorization may be provided automatically by a suitable, secure application or utility running on server 56, or may be invoked by other user-controlled procedures.

Upon receiving the confirmation, gateway 52 conveys the decryption key to computer 58. The key may be transmitted over network 26, typically in encrypted form. For example, gateway 52 may be preconfigured with a public key of computer 58 (and possibly with respective public keys of other computers on network 26 that are authorized to receive data from network 22). The gateway then uses the appropriate public key to encrypt its own decryption key for transmission in a data packet to computer 58. Upon receiving this packet, computer 58 uses its private key to decrypt the decryption key transmitted by gateway 52, and may then use the decryption key to decrypt the data. Alternatively, the decryption key may be conveyed from gateway 52 to computer 58 via secure channels outside network 26, as noted above in regard to gateway 24.

Although the embodiments described above refer to the specific network configurations of systems 20 and 50, the principles of the present invention may be applied for suppression of malicious traffic among other arrangements of transmitters and receivers. All such alternative arrangements are considered to be within the scope of the present invention. It will thus be appreciated that the embodiments described above are cited by way of example, and that the present invention is not limited to what has been particularly shown and described hereinabove. Rather, the scope of the present invention includes both combinations and subcombinations of the various features described hereinabove, as well as variations and modifications thereof which would occur to persons skilled in the art upon reading the foregoing description and which are not disclosed in the prior art. 

The invention claimed is:
 1. A computer-implemented method for protecting a private computer network, comprising: providing a private protected computer network; receiving at a gateway between a public network and the private protected computer network, data transmitted from a source address outside the private protected network over the public network, for delivery to a destination on the private protected computer network; encrypting the data at the gateway using an encryption key, selected in a pseudo random process, when the data is received, from a set of one or more keys that are not available to the source address; transmitting the encrypted data over the private computer network toward the destination; receiving the transmitted encrypted data, and decrypting the data for use at the destination by means of a corresponding decryption key; and conveying the corresponding decryption key to the destination over the private computer network together with at least a portion of the encrypted data, wherein conveying the decryption key comprises transmitting the decryption key in the clear to the destination, together with at least a portion of the encrypted data.
 2. The method according to claim 1, wherein encrypting and transmitting the data are performed automatically, without intervention by a human operator.
 3. The method according to claim 1, wherein receiving the data comprises receiving a data packet comprising a header and a payload, and wherein encrypting the data comprises encrypting both the header and the payload, and wherein conveying the encrypted data comprises encapsulating the encrypted header and payload in another packet for transmission over the computer network.
 4. The method according to claim 1, wherein conveying the decryption key comprises sending the decryption key together with at least the portion of the encrypted data in a single data packet.
 5. The method according to claim 1, wherein conveying the decryption key comprises waiting for a selected delay period between transmitting the encrypted data and transmitting the decryption key to the destination.
 6. The method according to claim 1, and comprising, upon decrypting the data, checking the data for malicious content, wherein decrypting the data comprises separately decrypting each of a sequence of segments of the encrypted data, and wherein checking the data comprises verifying each segment in the sequence to ensure that the segment does not contain the malicious content before proceeding to decrypt succeeding segments in the sequence.
 7. A computer-implemented method for protecting a private protected computer network, comprising: receiving at a gateway between a public network and a private protected computer network, a first data packet, comprising a header and a payload, transmitted from a source address outside the private protected network for delivery to a destination on the private computer network; encrypting, by the gateway, at least the header of the first data packet, thereby generating an encrypted data packet; encapsulating, by the gateway, the encrypted data packet in a second data packet, and transmitting the second data packet over the private computer network toward the destination; transmitting a decryption key suitable for decrypting the encrypted data packet in the clear together with at least a portion of the encrypted data, from the gateway to the destination over the private computer network; and receiving and processing the transmitted second data packet so as to decapsulate and decrypt the first data packet for use at the destination.
 8. Apparatus for protecting a computer network, comprising: a gateway between a public network and a private protected computer network, which is configured to receive data transmitted from a source address outside the private protected network, for delivery to a destination on the private computer network, and to encrypt the data using an encryption key selected in a pseudo random process, when the data is received, from a set of one or more keys that are not available to the source address, encrypting the data using the key, to transmit the encrypted data over the private computer network toward the destination, to convey a decryption key corresponding to the encrypted data to the destination in the clear over the private computer network together with at least a portion of the encrypted data; and a receiver, which is configured to receive the transmitted encrypted data, and to decrypt the data for use at the destination by means of one of the keys in the set.
 9. A computer-implemented method for protecting data, comprising: receiving at a gateway data transmitted from a source within a protected computer network for delivery to a destination outside the protected computer network; encrypting the data at the gateway using an encryption key selected from a set of one or more keys that are not available to the source or to the destination prior to receiving the data at the gateway; transmitting the encrypted data to the destination; receiving at the gateway, from the source, a confirmation of an authorization to transmit a decryption key, after beginning the transmission of the encrypted data to the destination; and responsively to the confirmation, conveying the decryption key suitable for decrypting the data to the destination.
 10. The method according to claim 9, wherein receiving the confirmation comprises receiving an electronic signature transmitted from the source.
 11. The method according to claim 9, wherein transmitting the encrypted data comprises transmitting the encrypted data over a one-way link from the gateway to destinations outside the protected computer network.
 12. The method according to claim 9, wherein encrypting and transmitting the data are performed automatically, without intervention by a human operator.
 13. Apparatus for protecting data, comprising: a source computer, which is configured to be deployed in a protected computer network and to generate data for delivery to a destination outside the protected computer network; and a gateway, which is coupled to receive and encrypt the data from the source computer using an encryption key selected from a set of one or more keys that are not available to the source computer or to the destination prior to receiving the data at the gateway, to transmit the encrypted data to the destination, to receive, from the source, a confirmation of an authorization to transmit a decryption key, after beginning the transmission of the encrypted data to the destination, and responsively to the confirmation, to convey the decryption key suitable for decrypting the data at the destination.
 14. The method according to claim 1, wherein encrypting the data comprises encrypting a portion of the packet and leaving a portion of the packet unencrypted.
 15. The method according to claim 14, wherein the data packet comprises a plurality of headers and wherein encrypting a portion of the packet comprises encrypting at least one header of the packet and leaving at least one header unencrypted.
 16. The method according to claim 1, wherein receiving the data comprises receiving previously encrypted data.
 17. The method of claim 1, wherein encrypting the data comprises encrypting using an asymmetric encryption scheme.
 18. The method according to claim 1, wherein the decryption key comprises the encryption key.
 19. The method according to claim 1, wherein conveying the decryption key comprises transmitting the decryption key in the clear to the destination.
 20. The method of claim 7, wherein encrypting at least the header of the first data packet comprises encrypting a portion of the packet and leaving a portion of the packet unencrypted.
 21. The method according to claim 7, wherein the data packet comprises a plurality of headers and wherein encrypting at least the header of the first data packet comprises encrypting at least one header of the packet and leaving at least one header unencrypted.
 22. The method according to claim 9, wherein the authorization to transmit the received data is received after completing the transmission of the encrypted data to the destination.
 23. The method according to claim 16, wherein encrypting the data at the gateway comprises encrypting the previously encrypted data, so as to add an additional layer of encryption to the received encrypted data. 